package td.pt.event;

import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.HasHandlers;
import com.google.gwt.event.shared.HandlerRegistration;

public class HideAllPopupsEvent extends
		GwtEvent<HideAllPopupsEvent.HideAllPopupsHandler> {

	public static Type<HideAllPopupsHandler> TYPE = new Type<HideAllPopupsHandler>();

	public interface HideAllPopupsHandler extends EventHandler {
		void onHideAllPopups(HideAllPopupsEvent event);
	}

	public interface HideAllPopupsHasHandlers extends HasHandlers {
		HandlerRegistration addHideAllPopupsHandler(HideAllPopupsHandler handler);
	}

	public HideAllPopupsEvent() {
	}

	@Override
	protected void dispatch(HideAllPopupsHandler handler) {
		handler.onHideAllPopups(this);
	}

	@Override
	public Type<HideAllPopupsHandler> getAssociatedType() {
		return TYPE;
	}

	public static Type<HideAllPopupsHandler> getType() {
		return TYPE;
	}

	public static void fire(HasHandlers source) {
		source.fireEvent(new HideAllPopupsEvent());
	}
}
